/**
 * @file Detect.h
 * @author enemy1205 (enemy1205@qq.com)
 * @brief 识别基类头文件
 * @date 2021-09-12
 *
 */
#pragma once

#include <opencv2/highgui/highgui.hpp>
#include <deque>
#include "KalmanFilterX.hpp"
#include "Features.h"
#include "PreProcess.h"
#include <algorithm>
#include "Log.h"

using std::deque;
using cv::Mat, cv::Point2f;

//识别类，用于识别每帧装甲板,每帧更新
class Detector {
public:
    //返回当前识别到的特征
    std::vector<Features_ptr> getCurrentFeatures() const { return this->features; }
    //默认构造
    Detector();
    //展示函数接口
    void show(const uint8_t &tpf);
    //绘制接口
    virtual void draw(const cv::Point2f &) {};
    int c;//waitKey时间
    bool isTrackerMatched; //该帧是否被匹配
protected:
    std::vector<Features_ptr> features;//当前帧识别到的特征
    Mat *frame;//图像源图
    Mat bin;//二值化结果图

};
